home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / gle / demo / loop.gle < prev    next >
Encoding:
Text File  |  1992-11-29  |  808 b   |  41 lines

  1. size 18 24 box        ! This is LOOP.GLE, shows programming examples
  2. amove 5 14
  3. set just center hei 1
  4. text Subroutines, Loops
  5. set just left hei .7
  6. set hei .9
  7.  
  8. ! First define a single neuron
  9. sub neuron xx yy
  10.    amove xx yy 
  11.    begin scale .5 .5
  12.       curve  0  .4  .4  .4  .4 -.4  .4  .4  .4 -.8 -.4 -.8 -.4 .4
  13.       curve -.4 -.8 -.4  .4 -.4 -.4 -.4  .4  0  .4   
  14.       closepath
  15.    end scale
  16. end sub
  17.  
  18. ! Draw the neurons
  19. for xx = 0 to 1
  20.    for i = 1 to 6
  21.       @neuron xx*6+2 i*2+1.2
  22.    next i
  23. next xx
  24.  
  25. ! Draw the lines between them
  26. for i = 1 to 6
  27.    for j = 1 to 6
  28.       amove 3 i*2+1
  29.       aline 7.5 j*2+1
  30.    next j
  31. next i
  32.  
  33. !--------------------------------------------------------------------------
  34. include ziptext.gle
  35. amove 12 1
  36. @ziptext "Hello"
  37. amove 13 4
  38. begin rotate 20
  39.    @ziptext "Green trees"
  40. end rotate
  41.